Automatic calibration systems and methods of use

ABSTRACT

The disclosed automatic calibration systems and methods provide a repeatable way to detect internal catheter reflections and to shift the internal catheter reflections to calibrate an image.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation-in-part of U.S. patent application Ser. No.13/249,339, which was filed Sep. 23, 2011, which is a continuation ofSer. No. 12/172,980 (now U.S. Pat. No. 8,049,900), which was filed Jul.14, 2008 and which claims priority to U.S. Patent Application Ser. No.60/949,467 filed Jul. 12, 2007, and the entirety of each of which isincorporated herein by reference.

FIELD OF THE INVENTION

The invention generally relates to calibration systems and methods ofuse, and more particularly to calibration systems for optical imagingsystems.

BACKGROUND

Accurate Optical Coherence Tomography (OCT) measurements or dimensionalanalysis require the displayed tomographic image to correctly representphysical space (i.e. conversion from image pixels to physical mm). Thisrequirement is complicated by factors such as varying object refractiveindexes (catheter optics, sheath, lumen, tissue) and the arbitrarylocation (in z) of relevant image features due to mismatch in theinterferometer's sample and reference paths.

Most current methods require the user to manually calibrate the image byadjusting the Z-Offset position (reference arm path length) until theouter diameter of the catheter sheath aligns with fixed tick marks onthe screen. This method can be time consuming and lends itself tooperator error. Additionally, once the catheter is shifted from theoriginal calibrated position, the calibration can be thrown off due totime-varying mechanical strain (e.g. pullback motion or manipulation ofPIM cable) or thermal changes (room temp vs. body temp).

SUMMARY OF THE INVENTION

The invention addresses the above-identified problems and relates toautomatic calibration. A catheter can be calibrated, according to theinvention, by taking an image in a catheter and utilizing a template toidentify the position of the catheter reflection lines. Another way tocalibrate a catheter is to image a catheter pullback, align the imagedata to ensure any shifts to the reflection positions during imageacquisition are corrected, and track the reflection positions througheach image frame. Yet another way to calibrate a catheter is take animage of a catheter, track the reflection lines of the catheter, notdetect the reflection lines in an image, and reacquire the lost trackimage with a graph search step or a template matching step.

The foregoing and other features, advantages, and objects of theinvention will become more apparent with reference to the disclosurethat follows. The following description of exemplary embodiments, readin conjunction with the accompanying figures, is merely illustrativerather than limiting.

BRIEF DESCRIPTION OF THE DRAWINGS

The following brief descriptions are provided for a more completeunderstanding of the figures, but it should be understood thatembodiments according to the invention are not necessarily limited tothe precise arrangements and configurations shown.

FIG. 1 is a graph showing the sample frame demonstrating catheterreflections used for calibration, in accordance with one embodiment.

FIG. 2A is a graph of a template matching algorithm identifying a peakat bin 340, in accordance with one embodiment; and FIG. 2B is a graph ofthe zoomed in region A showing template match at bin 340, in accordancewith one embodiment.

FIG. 3 is an enlarged image of reflection motion through one frame(motion due to tortuous pull back), in accordance with one embodiment.

FIG. 4 is a graph search algorithm, in accordance with one embodiment.

FIG. 5 is an image frame of a catheter pullback sequence and the trackmaintained through image frame, in accordance with one embodiment.

FIG. 6 is an image frame 40 of a catheter pullback sequence and thecatheter reflection lines not being present and the track is lost, inaccordance with one embodiment.

FIG. 7 is an image frame 50 of a catheter pullback sequence and thecatheter reflections reappearing and the track reacquired forautocalibration, in accordance with one embodiment.

FIG. 8A is a flowchart displaying the first mode of the templatematching step 100, in accordance with one embodiment; and FIG. 8B is aflowchart displaying the first mode of the template matching step 100,in accordance with an alternative embodiment.

FIG. 9 is a flowchart displaying the second mode of the playbacktracking step 200, in accordance with one embodiment.

FIG. 10 is a flowchart displaying the third mode of the reacquiring losttrack step 300, in accordance with one embodiment.

FIG. 11 is a flowchart displaying the auto-calibration in playbackmethod 400, in accordance with one embodiment.

FIG. 12 is a flowchart displaying the auto-calibration initial lockmethod 500, in accordance with one embodiment.

FIGS. 13A-13D are graphs of the first step in the initial lock mode ofsearching for a strong reflection using the mean amplitude or gradientsand adjusting the Z-Offset until detected.

FIGS. 14A-14B are graphs of the second step in the initial lock mode ofaligning the reflections across the A-scans in the rectangular image.

FIGS. 15A-15B are graphs of the third step of identifying the catheterreflections using the gradient and amplitude.

FIGS. 16A-16B are graphs of the fourth step in the initial lock mode ofgenerating the template of reflections and storing for later use.

FIG. 17 is flow chart of the Initial Z-Offset Calibration.

FIGS. 18A-18D are graphs of the first step in the live tracking modeshifting the template to search the location and creating the “FullTemplate” with a mirrored signal.

FIG. 19 is a graph and equation for the second step in the live trackingmode for computing the correlation coefficient for the template and allA-scans, which is limited to template size.

FIG. 20 is a graph of the third step in the live tracking mode forfinding the maximum correlation per A-scan and taking the median of thetop “n” A-scans.

FIGS. 21A-21B are OCT images before and after calibrations in the fourthstep by applying the digital shift to the image and scan-convert.

FIG. 22 is a flow chart of the live-mode tracking, in accordance withone embodiment.

FIGS. 23A-23B are graphs of the first step in the playback tracking modeto determine the starting position of the reflection tracking usingmaximum correlation across all A-scans with large search region,

FIG. 24 is a graph of the second step of the playback tracking mode fromthe starting Position, track reflections backward and forwards A-scan byA-scan using the same correlation technique but with small searchregion.

FIGS. 25A-25B are graphs of the third step in the playback tracking modeand continuing to track A-scan by A-scan through all frame in datasetand store reflection position for later alignment and display to aviewer on a video monitor or other physical display device.

FIG. 26 is a flow chart of the Playback Mode Tracking Algorithm.

FIG. 27 is a flow chart of one embodiment of the automatic calibration.

DETAILED DESCRIPTION OF THE INVENTION

In general, automatic calibration systems and methods according to theinvention provide a repeatable way of detecting the internal catheterreflections and shifting the internal catheter reflections to calibratean image. In one embodiment, the internal catheter reflections comprisereflections due to the end of the fiber optic cable, minor, lens,sheath, fluids, biological vessels, or any other objects that causereflections and the like. The internal catheter reflections can beshifted mechanically and/or digitally. Generally, the automaticcalibration comprises a first mode, a second mode, and a third mode. Thecalibration systems and methods update and maintain the calibration on acontinuous frame-by-frame basis after an initial calibration.

An Optical Coherence Tomography (OCT) system may include a Fourierdomain OCT (“FD-OCT”), sometimes known as Spectral Domain OCT(“SD-OCT”), or a Time-Domain OCT scanning (“TD-OCT”), where the opticalpath length of light in the reference arm of the interferometer israpidly scanned over a distance corresponding to the imaging depthrange. The

OCT systems may be polarization-sensitive or phase-sensitive andadjusted accordingly. Alternatively, the imaging system may be any otheroptical imaging based system including, but not limited to spectroscopy,(including fluorescence, absorption, scattering, and Ramanspectroscopies)

OCT Depth Calibration and Automated Range Adjustment

Circular and cylindrical OCT scanning devices, i.e. the rotationcatheter scanning devices, sample physical space in an inherently polarcoordinate system (e.g. radius and angle rather than length and width).Circular and cylindrical OCT scanning devices are applied to imagephysiological structures with cylindrical-like cross sections e.g.,airways and blood vessel lumens). Digital representations of the images(i.e. arrays of pixels representing numeric values) are inherentlyrectangular. A method for detecting and using OCT image features, eitherintentionally or artifactually generated comprises automaticallyadjusting the depth range in polar (“radar-like”) OCT images.

Polar OCT images are converted from their rectangular representationbefore displaying to the viewer on a video monitor or other physicaldisplay device. Additionally, if quantitative values (e.g. lumendiameters, lumen areas, circumferences, etc.) are to be measured on thepolar image, then the transformation from rectangular-to-polar preservesrelative distances between pixels in all dimensions (radial andangular). Generally, the OCT depth scan (y axis in rectangularcoordinates) maps directly to radius and the OCT circumferential scan (xaxis in rectangular coordinates) maps to some increment of 2*Pi radians(or 360°) polar angle.

For example: y=0 (the top row of the rectangular image) maps to radius=0(the center of the polar image) and y=y_(max) (the bottom row of therectangular image) maps to radius=y_(max) (the perimeter of the polarimage). Likewise, x=0 (the left column in the rectangular image) maps toangle=0° and x=x_(max)/2 maps to approximately 180° and x=x_(max) mapsto an angle of approximately 359°.

For accurate quantitative dimensional measurement in polar images,pixels mapping to radius=0 represent the actual physical space at thecenter of the axis of rotation of the imaging probe, otherwise the polarimage will be artificially warped (expanded or contracted) in the radialdirection. However, in an arbitrary OCT image, the pixels at y=0 do notnecessarily satisfy this requirement and must be shifted in they-dimension until this is satisfied before mapping to a polarrepresentation. Differential displacements (either controlled oruncontrolled) in the path length of the sample vs. reference arms of theinterferometer will shift the pixels in the y-dimension.

Uncontrollable displacements can occur when using cylindrical orhelical-scanning fiber-optic OCT catheters. For example, when thecatheter is pushed or pulled longitudinally, the fiber-optic cable canbe compressed or stretched and thus a path length displacement isincurred.

The method generally comprises automatically recognizing theuncontrolled displacement effect by searching for image features thatare stationary but are not due to uncontrollable displacement, andcalibrating successive OCT image data so that polar representations canbe used for accurate dimensional measurements. In one embodiment, themethod further comprises removing of image features in the image priorto display on a video monitor or other display device.

Image features used by the method are generated within the catheteritself (not within the imaged subject or surroundings) and appearsomewhat stable in depth and consistent in intensity throughout the 360°rotation of the catheter. These image features include, but are notlimited to, back reflections at interfaces between optical components(aka “ghost-lines” or “echo artifacts”, these occur along the opticalaxis of rotating parts and thus appear as uniform circles in the polarimage when no differential path length displacement occurs over thecourse of one catheter rotation), or reflections from the boundaries ofor from within the stationary (non-rotating) catheter sheath (if it iscircular in cross-sectional profile and also mechanically concentricwith the rotating portion).

The embodiments disclosed herein include 3 methods for automaticcalibration that utilize a plurality of back reflections to identify therequired shift to achieve proper calibration.

While there may be overlap between each of the 3 methods, each of the 3methods are documented in a separate section for descriptive purposesonly, and each of the 3 methods may be combined in alternativeconfiguration, methods, parameters and the like. The first methodincludes an Automatic Calibration of the Z-offset, which is averagingand a general auto-calibration implementation. The second methodincludes an Automatic Calibration of Z-offset, which includes a TemplateMatching and a Graph Search method. The third method is an AutomaticCalibration of Z-offset, which includes a Full Template Correlation.

Method 1: Automatic Calibration of Z-offset and Averaging. In oneembodiment, steps in the automatic recognition and calibration methodinclude: (1) Averaging the OCT image frame along the x- (i.e. angular)dimension to selectively enhance the feature(s) that are rotationallystable in the y-dimension (i.e. radius) vs. other image featuresgenerated by subject or surroundings. Efficacy of the averaging step isimproved by selecting image feature(s) that have a high intensityrelative to the surrounding pixels and if the subject/environmentfeatures (noise) do not have strong circumferential symmetry. In oneembodiment, the method further comprises: (2) Finding image feature(s)using peak searching, correlation, thresholding, or other patternrecognition algorithms. Efficacy of the finding image features step isimproved if the range over which uncontrolled path length displacementscan occur is known a priori, thus limiting the required search space. Inone embodiment, the method further comprises: (3) Comparing they-value(s) of the image feature(s) found in step 2 to a pre-calibratedy-value that represents the actual physical location(s) of that imagefeature(s) relative to the rotational axis, or to the location of aknown “conjugate image” or “aliased image” of that feature(s) when usingspectral-domain OCT. In one embodiment, the method further comprises:(4) Calibrating by shifting the OCT image pixels in the y-dimension bythe difference between searched image feature(s) and pre-calibratedimage feature(s). Multiple features can be used to improve efficacy ofthe algorithm. After shifting the rectangular image in the y-dimension,mapping to polar image coordinates may take place. Radii measured to thecenter of the calibrated polar image represent actual radii measured tothe rotational axis in physical space. Some image features due to thecatheter are unwanted for effective and distraction-free display of thesubject/environment features on a video monitor or other physicaldisplay device. For example, the catheter image features could overlapthe subject/environment features.

In one embodiment, steps to remove (or make less noticeable) the imagefeatures include:

cropping out the image feature(s) extent in the radial y-direction andin all columns/angles; calculating the average value of the pixelsimmediately inside and outside (above and below) of the cropped regionfor all columns/angles; and inserting this averaged row/circumference inthe cropped location. The cropping operation can also removesubject/environment features and distorts the image in the radialdimension. This distortion makes measurement of accurate quantitativevalues on such images more complicated, because the measurement toolmust then consider where pixels have and have not been cropped (or makethe measurement on the un-cropped image).

In the calibration embodiment described above, the calibration methodaverages over a frame to identify a reflection, then adjusts the imagedigitally based on the feature location, and applies a constant shiftfor all A-scans within an image. An alternative method for an automaticcalibration of the Z-offset uses internal catheter features that appearin the image to identify the required shift, which does not average theimage intensities across a frame to find the image features, but uses apattern of the reflections in the form of a template to identify theposition of the reflections in an initial locking algorithm. “Template”generally refers to the catheter reflections pattern. This methodapplies a line-by-line shift to ensure that every A-scan is properlyaligned for measurements in the playback mode algorithm. This method ofBinary Template Matching and Graph Searching for Automatic Calibrationof Z-offset is described in more detail below.

Method 2: Automatic Calibration of Z-offset and Template Matching andGraph Search. In one embodiment, the Automatic Calibration of Z-offsetcomprises a first mode of calibrating catheter reflections including aninitial lock step. The initial lock comprises utilizing a template toidentify the position of the catheter reflection lines unique to aparticular catheter, as shown in FIG. 1. The template for each catheteris stored with the specific catheter. In one embodiment, the template isstored on a Radio Frequency Identification (RFID) chip, alternatively,the template may be stored on a computer chip, and the like.Alternatively, RFID or computer chip may be removable and then be usedas a portable template or medical record. Alternatively, if the catheteris approved for reuse, the Patient Interface Module or PIM may down loadspecific information regarding the template for the particular catheter.This template information may be stored and tracked on the cathetermonitor and limit the number of uses or hours of use to a predeterminedamount also stored on the catheter. In one embodiment the RFID chip maybe a

Maxwell ME1 or ME2 RFID chip, mounted on the connector on the proximalend of the catheter for storing information and communicating with theinterface device. In an alternative embodiment, the catheter may have asecond RFID chip (not shown) mounted 180 degrees from the first RFIDchip of the connector so catheter can be connected to interface deviceat more than one circumferential orientation. The RFID chip may have amemory of 128 bytes, alternatively 1K byte, alternatively 2K bytesalternatively 4K bytes to store catheter specific information, includingfor example catheter serial number, name, make or model, calibrationcoefficients, imaging element sensitivity, time gain control, post ampgain, number of permissible uses, geographic location of permissibleuse, boot mode, pulse width, or expiration date of the catheter.

The template is convolved with a binary version of the gradient imageand a peak is identified in a template matching step, as shown in FIG.2A. The template matching step includes selecting a peak thatcorresponds to a strongest template match. In one embodiment, the peakis above a certain value to ensure that the strongest template match isidentified. If no template match is identified, the Z-Offset position isadjusted and an image at the new position is evaluated with the templatematching step or algorithm. Once the position of the catheter reflectionlines are identified, the catheter reflection lines are shifted byadjusting the Z-Offset to move the reflections to their desired locationand the image/catheter is now calibrated, as shown in FIG. 2B. In oneembodiment, the adjusting Z-Offset comprises the mechanical shifting ofthe Variable Delay Line (VDL)). If the template matching algorithm isunable to identify a strong template match, the user is warned and giventhe option to retry auto-calibration or manually calibrate.

In one embodiment of Method 2 for the Automatic Calibration of Z-offsetfor the Template Matching and Graph Search, the second mode ofcalibrating catheter reflections comprises playback tracking. Playbacktracking generally includes aligning the image data after recording acatheter pullback to ensure any shifts to the reflection positionsduring acquisition are corrected to allow for proper analysis and/ormeasurements. Tracking the reflections through the recorded dataset isslightly more difficult due to the motion during pullbacks and theposition of the reflections can vary significantly over a single frame.FIG. 3 demonstrates an example of significant shifting of the catheterreflections during a tortuous pullback. A graph searching step oralgorithm is utilized to track the reflection through each frame. Thegraph search initial is identified by the template matching step oralgorithm described above. Once an initial lock is acquired, thereflection lines are tracked through the image based on their amplitudeand relative position. In one embodiment, the lines are tracked throughthe image based on their amplitude and relative position by maintaininga constant distance. The graph search step begins at the first A-scanand then looks at the neighboring pixels in the following A-scan todetermine the direction for the next step. This process is then repeatedfor each A-scan. The algorithm also allows for “look ahead” whichincludes evaluating the next A-scan and looking ahead at the next “n”A-scans before determining the step direction. The black lines tracingthe reflection in FIG. 3 demonstrate the results of the graph searchalgorithm. FIG. 4 provides a slightly more detailed explanation of thegraph search algorithm. Once the lines have been traced through anentire frame they are digitally aligned and the frame is then properlycalibrated for display and measurements.

In one embodiment, the third mode of calibrating catheter reflectionscomprises a reacquiring lost track step. The reacquiring lost track stepcomprises reacquiring a track if the reflection lines are not detectedin the previous image frames. As shown in FIGS. 5-7, the track of thereflections are lost during a tortuous pullback and then reacquired oncethe reflections reappear. To reacquire a lost track both the graphsearch step 220 and the template matching algorithms may be used. Thegraph search step expands the region of allowable solutions to search awider number of bins for the reappearing reflections. A “guard band” isidentified to limit the possible search region and prevents from lockingon to the bright returns from the vessel wall. The template matchingstep may also be performed as described in the Initial Locking step.Once the track is reacquired, the algorithm transitions back to PlaybackTracking mode to continue tracking the reflections through eachsubsequent frame.

With reference to FIG. 8A, an illustrated method of the first mode andthe initial lock step 100 is shown. The process begins at step 110 bytaking an OCT image in a catheter. Then, step 120 utilizes a template toidentify the position of the catheter reflection lines unique to aparticular catheter from a module or other software device, as shown inFIG. 2B. The template for each catheter is stored or operably accessiblewith the specific catheter. In one embodiment, the template is stored ona Radio Frequency Identification (RFID) chip or transponder or tag;alternatively, the template may be stored on a computer chip, cache,flash drive, and any other storage medium. The template matching step oralgorithm 130 convolves the template with a binary version of thegradient OCT image and a peak is identified, as shown in FIG. 2A. Thetemplate matching step includes step 140 for selecting a peak thatcorresponds to a strongest template match. In one embodiment, the peakis above a certain value to ensure that the strongest template match isidentified. If no template match is identified in decision 150, themethod proceeds to step 170 where the Z-Offset position is adjusted andan image at the new position is evaluated with the template matchingstep or algorithm 130. If the template matching algorithm is unable toidentify a strong match, the user is warned and given the option toretry auto-calibration or manually calibrate. If a template match isidentified in decision 150, the position of the catheter reflectionlines are identified, the catheter reflection lines are shifted byadjusting the Z-Offset to move the reflections to their desiredlocation, and the image/catheter is now calibrated, as shown in FIG. 2B.In one embodiment, the adjusting Z-Offset comprises the mechanicalshifting of the Variable Delay Line (VDL).

With reference to FIG. 8B, an alternative method of the first mode andthe initial lock step 100 b is shown. The process 100 b begins similaras process 100 a at step 110 by taking an OCT image in a catheter. Then,step 120 utilizes a template to identify the position of the catheterreflection lines unique to a particular catheter from a module or othersoftware device, as shown in FIG. 2B. The template for each catheter isstored or operably accessible with the specific catheter. In oneembodiment, the template is stored on a Radio Frequency Identification(RFID) chip or transponder or tag; alternatively, the template may bestored on a computer chip, cache, flash drive, and any other storagemedium. The template matching step 130 convolves the template with abinary version of the gradient OCT image and a peak is identified, asshown in FIG. 2A. The template matching step includes step 140 forselecting a peak that corresponds to a strongest template match. In oneembodiment, the peak is above a certain value to ensure that thestrongest template match is identified. If no template match isidentified in decision 150, the method proceeds to step 170 where theZ-Offset position is adjusted and an image at the new position isevaluated with the template matching step 130. If the template matchingalgorithm is unable to identify a strong template match, the user iswarned and given the option to retry auto-calibration or manuallycalibrate. If a template match is identified in decision 150, theposition of the catheter reflection lines are identified, the catheterreflection lines are shifted by adjusting the Z-Offset to move thereflections to their desired location, and the image/catheter is nowcalibrated, as shown in FIG. 2B.

With reference to FIG. 9, an illustrated method of the second mode andthe playback tracking 200 is shown. The playback tracking method 200begins with step 210 of recording a catheter pullback or push-forward.The objective of the playback mode tracking is to digitally aligning theimage data to ensure any shifts to the reflection positions during imageacquisition are corrected to allow for proper analysis and/ormeasurements. Tracking the reflections through the recorded dataset isslightly more difficult due to the motion during pullbacks and theposition of the reflections can vary significantly over a single frame.FIG. 3 demonstrates an example of significant shifting of the catheterreflections during a tortuous pullback. The playback tracking method,200, utilizes a graph searching algorithm to track the reflectionthrough each image frame. Prior to beginning the graph search algorithmin step 220 the initial position of the reflections are identified usingthe template matching algorithm described 130 above. Once an initiallock 230 is acquired, step 240 tracks the reflection lines through theimage based on their amplitude and relative position. In one embodiment,the lines are tracked through the image based on their amplitude andrelative position by maintaining a constant distance. Step 250 beginswith the first A-scan, then looks at the neighboring pixels in thefollowing A-scan to determine the direction for the next step, andrepeated for each A-scan. Step 260 allows for “look ahead” that includesevaluating the next A-scan and looking ahead at the next “n” A-scansbefore determining the step direction. Step 270 uses the informationfrom steps 250 and 260 to determine the direction of the reflections inthe current A-Scan. In 280 the algorithm increments to the next A-Scanand repeats the same processing until all A-Scans in the playback havebeen evaluated. The black lines tracing the reflection in FIG. 3demonstrate the results of the graph search algorithm. FIG. 4 provides aslightly more detailed explanation of the graph search algorithm. Step290 traces the reflection lines through an entire frame they aredigitally aligned and the frame is then properly calibrated for displayand measurements.

With reference to FIG. 10, an illustrated method of the third mode andthe reacquiring lost track method 300 are shown. The reacquiring losttrack method 300 begins at step 310 if the reflection lines are notdetected in the previous image frames. In one embodiment, the reflectionlines may be lost during a tortuous pullback of the catheter. Once thereflections reappear at step 320, the lost track may be reacquired withthe graph search step 220 and the template matching algorithms 120, asindicated above. The graph search step 220 expands the region ofallowable solutions to search a wider number of bins for the reappearingreflections in step 330. In step 340, the “guard band” is identified tolimit the possible search region and then locking on to the brightreturns from the vessel wall is prevented. The template matching step120 may also be performed as described in the Initial Locking stepabove. In step 350, once the track is reacquired, the algorithmtransitions back to the Playback Tracking mode to continue tracking thereflections through each subsequent frame.

With reference to FIG. 11, an alternative embodiment of theauto-calibration in playback method 400 is shown. The method 400generally comprises acquiring pullback or push-forward data 402 andobtaining a threshold image 404. A number of inputs 410 may be coupledto the threshold image, such as B-Scan data 412, noise estimates 414, orcurrent Z-offset 416. Next, step 420 is the graph search algorithm 420,which includes computing the difference of template and pixel amplitudefor allowable shifts 422, computing the difference for n-look aheads424, finding the shift direction with the minimum amplitude difference426, and updating the template location and storing the reflectionamplitudes 428. Next, decision 430 determines if all A-scans have beenprocessed. If so, the method proceeds to step 440 in storing all A-scanshifts for future alignment and display, and then playback method forautocalibration is complete 480. A further output 490 may include thedata of the A-scan shift 492 for the playback method 400. If all theA-scans have not been processed at decision 430, then step 450 isdetermining if reflections are detected at an expected amplitude value.Decision 452 determines if the lock is lost. If the lock is not lost,the step 454 proceeds to step to the next A-scan and to the Graph Searchalgorithm 420 and step 422 of computing the difference of template andpixel amplitude values for allowable shifts. If the lock is lost, thenthe Re-Acquire the lost track step 460 is implemented. The Re-Acquirelost track step 460 begins with step 462 of computing the guard bandregion, then applying the graph search step of the template matchingalgorithm to the larger region in step 464, as described previously.Next, decision 466 determines if the lock has been regained. If the lockhas been regained, then the Graph Search algorithm 420 is initiated andthe step 422 of computing the difference of template and pixel amplitudevalues for allowable shifts. If the lock has not been regained, decision468 determines if the lock lost time has been exceeded. If the lock losttime has been exceeded, the step 472 warns the user that calibration isunable to be completed, and the playback method of the auto-calibrationis complete in step 480 to be reinstituted or adjusted by the user. Ifthe lock lost time has not been exceeded, step 470 steps to the nextimage and retries to acquire the lock and proceeds to step 462 tocompute the guard band region once again in the Re-Acquire track step460.

With reference to FIG. 12, an alternative embodiment of theauto-calibration initial lock method 500 is shown. The method 500generally comprises selecting an image on mode and proceeds to decision504 to determine whether the first image is on mode. If it is not thefirst instance of the image on mode for a catheter, step 506 proceeds inreacquiring the lock without shifting the Z-offset position. If it isthe first instance of the image on mode, then the template matching step510, as described above. The template matching step 501 starts with step512 of converting the image to a binary B-scan, proceeds to step 514 ofcomputing the X and Y gradients, proceeds to step 516 convolving thegradients with the template (Forward and CC), and finds the peak 518 atstep 518. The template matching step 510 is finished and proceeds todecision 520 to determine if the peak threshold is obtained. If the peakthreshold is obtained, then step 522 finds the peak with asignal-to-noise ratio threshold in the region. If the peak threshold isnot obtained, then decision 524 determines if the all the Z-offsetpositions have been evaluated. Step 522 proceeds to decision 530 todetermine if at least 2 peaks have been found. If at least two peakshave not been found, then decision 524 is initiated. If at least twopeaks have been found, then step 532 shifts the Z-offset to +n Bins.Then step 534 waits for the Z-offset position to be reached and proceedsto decision 540. Decision 540 determines if the signal is moved to Bin+n. If the signal is moved to Bin +n, the step 542 shifts the peaks tothe desired location. If the signal is not move to Bin +n, the Decision550 determines if the signal is moved to Bin −n. If the signal is movedto Bin −n, then it proceeds to step 542. If the signal is not moved toBin −n, then it proceeds to Decision step 526 to shift the Z-offset ¼ ofthe A-scan size. Decision 524 also shifts to step 526 if all theZ-offset positions have not been evaluated. If all the Z-offset positionhave been evaluated, then step 528 warns the user that there is troublein the auto-calibration and to try initiation of the method 500 again.Then step 528 proceeds to Decision 560 to determine if the user isrequesting the auto-calibration method again. If the user is requestingthe auto-calibration method again, then step 562 resets the Z-offset tothe starting position. Step 562 then proceeds to step 564 to wait forthe Z-offset position to be reached, which then proceeds to the templatematching step 510 and step 512 of converting the image to a binaryB-scan.

Step 542 proceeds to step 544 to prompt the user that auto-calibrationis complete for entry of manual calibrations or accepting theauto-calibration. Step 544 then proceeds to decision 570, whichdetermines if the user is okay with the calibration. If the user acceptsthe calibration, then the initial lock method is complete in step 572.The outputs 580 for the initial lock include the current Z-offset 532,the reflection locations 584, or the reflection amplitudes 586. If theuser does not accept the calibration, then step 574 transitions tomanual calibration mode through a Graphical User Interface (GUI). Thendecision 590 allows the user to complete the calibration. If the usercompletes the calibration, then step 592 maintains the Z-offset unlesscalibration is further requested. If the user does not complete thecalibration, the step 574 transitions to manual calibration mode foradditional attempts by the user.

Automatic Calibration of Z-offset Method 3: Auto-Template Generation andFull Correlation. Alternatively, the template may not be stored on amemory chip or the RFID, as in the previous Method 2, and the templatemay be automatically generated during an initial lock mode process, asdescribed below for Method 3. The previous method utilized a binarytemplate for template matching, while Method 3 generates a template withamplitude information and the complex conjugate signal information.Utilizing amplitude information and generating the minor signalincreases the likelihood of locking on to the correct reflection lines.Additionally, Method 3 step or algorithm performs Auto-Calibrationduring initial lock and playback mode, and Method 3 also maintainscalibration during a live mode (when the catheter is imaging but is notrecording data).

In one embodiment for the first mode is the initial lock, which utilizesthe internal catheter reflections (fiber, minor and lens) to identifythe required VDL shift to reach the calibration position, as describedin previous methods. The initial lock Z-Offset calibration is the stepin which the reflection pattern or the template is determined. Thetemplate identified in the initial Z-offset calibration is utilized ineach subsequent calibration mode to track the shift of the reflectionsand apply the analog and digital shifts, as required or implemented. Thetemplate region is identified using gradient and amplitude information.Once the template is identified and stored for later use, the VDL shiftis applied and the catheter is ready for calibration during live andplayback mode. Acceptable error in this position will be determined bythe ability of the next mode (maintenance of Z-offset during liveimaging) to lock onto the reference pattern of catheter reflection linesin the OCT image.

FIGS. 13-16 provide an overview of the alternative steps for the initialZ-Offset calibration. FIGS. 13A-13D are graphs of the first step in theinitial lock mode of searching for a strong reflection using the meanamplitude or gradients and adjusting the Z-Offset until detected. FIG.13A shows that there are reflections present for the fiber, mirror,lens, sheath, and reflections for the template. The algorithm utilizes Xand Y gradients of the image to determine if reflections are present.FIG. 13B is the change of the X gradient and FIG. 13C is the change ofthe Y gradient. If no reflections are found, the VDL is shifted to thenext possible Z-offset location. Once strong reflections are identified,a slight positive VDL shift is applied to verify the orientation ofreflections. If the reflections shift towards the center of the image,then the reflections are oriented properly for calibration. If thereflections shift outward, the image is the complex conjugate signal anda large negative VDL shift is applied to unwrap the image. After theimage is determined to be properly oriented, the reflections are shiftedto the center of the window to ensure the full template region isvisible. If at any point during each of the shifting steps thereflection lines are no longer detected, the algorithm applies a newZ-offset and starts over looking for strong returns. FIG. 17 provides amore detailed version of the algorithm and user interaction.

Once the reflections have been centered in the image window the templateis computed. The template is an array of pixel numbers versus averageamplitude values beginning at the fiber reflection and ending at thelens reflection. The first step in identifying the template is to alignthe image based on the first strong reflection using a simple graphsearch algorithm, as shown in FIG. 14A. Aligning the reflections acrossthe A-scans is in the rectangular image is the second step for theinitial lock Z-offset calibration mode. Image alignment is done toincrease the likelihood reflections are straight in the rectangularimage and will be easily identified by their gradients and amplitude, asshown in FIG. 14B. Once the image alignment is complete, the internalcatheter reflections are identified using 4 characteristics: (1) StrongX and Weak Y Gradients (Assuming A-Scans Along the Y axis); (2)Consistently High Signal-to-Noise Ratio (SNR) of at least greater than15 dB; (3) Maximum Distance from First Reflection (Fiber) to LastReflection (Lens); and (4) Minimum of at least 2 Reflections.

As shown in FIGS. 15A-15B, the third step in the initial lock mode is toidentify the catheter reflections using the X and Y gradients. Step 4 ofthe initial lock generates template of reflections and stores thetemplate for later use. The template region is then defined as the meanacross A-Scans (i.e. angular) starting from the first reflection andending at the last reflection (with a 5 pixel margin on either side), asshown in FIG. 16A. To prevent small templates due to weak lensreflection, the minimum template size is 100 bins. Alternatively, theminimum template size is at least between about 20 and 1000 bins.Therefore, if the Lens reflection is not detected, the 100 bins afterthe fiber reflection are selected as the template region. This minimumdistance threshold may be determined based on the minimum distance fromthe fiber to the Inner Diameter (ID) of the sheath. The accuracy of thetemplate is highly dependent on locating the fiber reflection. If thefiber reflection is not found, the template may include the sheath orvessel region and result in improper calibration.

As shown in FIG. 16B, once the template is found, it is stored for lateruse in the subsequent auto-calibration algorithms. The VDL is thenshifted to position the fiber reflection at a pre-determined locationand the system transitions to live mode. If the reference pattern is notfound at this initial VDL position (unlikely but still non-zeroprobability), the value is assumed to be incorrect and a backup initialestimate search is performed by the system. The backup search proceduresweeps through VDL positions in a pre-determined fashion while thepattern recognition algorithm attempts to lock onto the referencepattern. Entering this backup search procedure is undesirable, becauseadditional time is used to find the correct initial calibration. If thebackup search fails (i.e. is unable to lock onto the reference pattern),the system assumes that the catheter or its connection to the PIM isfaulty and the user is notified to use an alternate catheter.

FIG. 17 is flow chart of the Initial Lock Z-Offset Calibration method600. The first step is 690 where the user selects the image on mode. Ifthis is the first image on mode, decision 692, the algorithm proceeds to612 searching for a strong reflection. Various inputs 610 such as theB-Scan, noise estimate, and current Z-offset may be coupled with step612. If it is not the first image on mode, the algorithm moves tocompletion box 694 to reacquire the template by simply shifting the VDLto the position the last template was acquired. After step 612, decision620 determines if a reflection line has been found. If a reflection hasbeen found, the step 622 proceeds to shift the reflection left n-numberof bins for a +Z-shift. In one embodiment, the shift of the reflectionsmay be between about 25 to 100 bins. If the reflection has not beenfound, then step 624 shifts to a new Z-offset. After step 622, step 626finds a strong reflection meeting a certain threshold using the meanamplitude or gradient, as indicated previously. Then decision 630determines if the reflection line move has been to the left. If thereflection line has moved, the step 632 shifts to a particular binnumber. If the reflection line has not been moved, then step 602 shiftsthe VDL to the complex conjugate (CC) of the start location (-Z-shift)to reset to find a strong reflection 612. After step 632, step 634 findsthe strong reflection and proceeds to decision 640 to determine if theline has been detected at a particular bin. If the line has beendetected at a particular bin, then step 642 computes the template. Ifthe line has not been detected, then decision 650 determines if all theZ-offsets have been attempted. If all the Z-offset have not beenattempted, then step 624 shifts to a new Z-offset position and step 612to find the strong reflection. If all the Z-offsets have been attempted,then step 652 warns the user that the program is unable to calibrate.After step 652, decision 654 warns the user to try again. If the userselects to try again, then step 624 shifts to a new Z-offset and step612 to find the strong reflection. If the user does not select to tryagain, then step 660 allows for manual calibration and warns user ofmanual calibration mode. After step 660, results 662 provides for theinitial calibration and complete transition of the live calibrationmode. Outputs 670 may be provided for the final Z-offset and thetemplate.

After step 642, decision 644 determines if at least two reflections arefound. If at least two reflections are found, step 646 shifts to thecalibrated location. If at least two reflections are not found, thendecision 650 is attempted to determine if all the Z-offsets have beenattempted. In one embodiment, a timer 680 may be coupled with thedecision 680 to determine if the autocalibration time has been exceeded.If the autocalibration time has been exceeded, then step 684 warns theuser that the program is unable to calibrate. After step 684, decision686 allows the user to try again. If the user selects to try again, thestep 624 shifts to a new Z-offset to find a strong reflection. If theuser does not select to try again, the step 660 allows for manualcalibration.

In an alternative embodiment of the second mode, a live mode trackingstep may be employed. During live mode auto-calibration, the templatecomputed during the initial lock step is utilized to maintain theinitial lock calibration position for all frames displayed on the screenon a video monitor or other display device. In one embodiment, theinitial lock calibration position for all frames may be at a rate of atleast 30 frames-per-second (fps), alternatively, between about 10 to 50fps. The catheter system may become un-calibrated due to shifts in theoptical path length caused by changes in temperature when the catheteris inserted into the body or mechanical strain on the fiber when thecatheter is longitudinally pushed or pulled. The live mode algorithmdetects the position of the catheter reflections using the template andupdates the digital and analog calibration settings to maintain theproper calibration setting. If only a small shift is necessary tomaintain the calibration position, a digital shift is applied to theimage prior to display. However, if the system becomes significantlyun-calibrated or a large shift is necessary to maintain calibration, aZ-offset update is applied (VDL shift).

The reflections are identified during live-mode tracking by finding themaximum correlation between the template and A-scans (i.e. templatematching). The search region for identifying the reflections is limitedbased on the maximum expected shift from frame to frame. The templatematching algorithm is slightly different than most standard templatematching implementations, since it modifies the template based on thesearch position to account for the wrapped complex conjugate signal.Prior to computing the correlation, the “full template” is generatedwhich includes the mirrored complex conjugate signal, as shown in FIGS.18A-18D. To compute the full template, first the original template isshifted to a search position, as shown in FIG. 18A, and second thesignal is summed with the mirrored version of the same signal, as shownin FIG. 18B. The correlation coefficient of the full template and eachA-scan is then computed, as shown in FIG. 19. This process is thenrepeated for each possible shift position in the search region. Once allcorrelations have been computed, the position of maximum correlation foreach A-scan is found, as shown in FIG. 20. The final reflection positionis assigned as the median position of the top “n” correlations. Once thecalibration shift is identified, the image is digitally adjusted toreturn the reflections to their calibrated position, as shown in FIGS.21A-21B. If the shift is beyond a pre-determine threshold for “n”frames, an update to the Z-offset (VDL) is applied. This algorithm isrepeated for every image displayed on a screen in live mode and utilizesthe previous frames correlation match and Z-offset to determine thesearch region for the next frame.

FIG. 22 provides a flowchart of the algorithm and the user interactionfor the live mode tracking process 700. In the live mode calibrationprocess, the calibration continues until “image off” is selected or acatheter longitudinal pullback is initiated. The position of thereflections just before the pullback begins is stored for use in aPlayback Mode autocalibration setting, as described below. Variousinputs 710 may be coupled with the live-mode tracking process, such asthe B-scan, the current Z-offset, and the like, as previously indicated.Step 712 determines if the autocalibration of the initial lock has beencompleted. Then step 714 computes the full template for all allowableshift positions. Then step 716 computes the correlation for the subsetof A-scans and the template. Then step 718 finds the maximum correlationfor each scan. Then step 720 finds the median shift of the topn-correlations. Then decision 730 determines if the correlation is abovea particular threshold. If the correlation is above a particularthreshold, then step 732 compute the correlation threshold based on therunning average. If the correlation is not above a particular threshold,the step 734 incremental lock lost counter proceeds. After step 734,decision 740 determines if the lock lost counter threshold has beenexceeded. If the lock lost counter threshold has been exceeded, thendecision 742 checks if the user has selected autocalibration as “on” todetermine if the user needs to be warned for the error. If the lock lostcounter threshold has not been exceeded, then step 744 proceeds toincrement to the next image, which is followed by step 714 to computethe full template for all allowable shifts positions for live-modetracking. In decision 742, if the autocalibration is selected “on” bythe user, then decision 750 determines if the lock lost counterthreshold is exceeded by 1. If the autocalibration is not selected “on”by the user, the step 744 proceeds to increment to the next image. Ifthe lock lost counter threshold is not exceeded by 1, then step 744proceeds to increment to the next image. If the lock lost counterthreshold is exceeded by 1, then step 752 warns the user that theautocalibration lock was lost, whereby the program can fade in thewindow or status bar of the computer.

After step 732, step 736 resets the lock lost to 0. Then decision 760determines if the autocalibration has been selected “on” by the user. Ifthe autocalibration has been selected “on” by the user, then step 762applies a digital shift to the current image for display. If theautocalibration has not been selected “on” by the user, then step 764updates the reflection position for the next image. After step 764, step744 increments the program to the next image. After step 762, decision770 determines if the digital shift threshold has been met. If thedigital shift threshold has been met, the step 772 proceeds with theincremental digital shift counter. If the digital shift threshold hasnot been met, then step 774 resets the digital shift counter to 0, whichthen proceeds to step 784 to update the reflection position for the nextimage. After step 772, decision 780 determines if the digital shiftcounter threshold has been exceeded. If the digital shift counterthreshold has been exceeded, then step 782 applies a VDL shift. If thedigital shift counter threshold has not been exceeded, then step 744increments to the next image for the live mode tracking process. In thelive mode calibration process, the calibration continues until “imageoff” is selected or a catheter longitudinal pullback is initiated. Theposition of the reflections just before the catheter pullback begins isstored for use in a Playback Mode autocalibration setting, as describedbelow.

In an alternative embodiment of the third mode, a playback mode trackingoccurs after the user has recorded an image dataset. The playback modetracking performs auto-calibration on every A-scan in the dataset.Similar to live mode tracking, the playback mode utilizes thecorrelation of the template and image A-scans at limited shift locationsto determine the position of the reflections. Identifying the initialposition of the reflections is such that the first frame of the datasetis treated different from the other frames. In the first frame of thedataset, the correlations for all allowable shifts and all A-scans arecomputed to find the maximum correlation, as shown in FIGS. 23A-23B.From the point of the maximum correlation, the algorithm then tracesthrough each A-scan backwards and forwards computing the correlation foreach possible shift, as shown in FIG. 24. The allowable shift region forthe first search is broad to allow for sudden jumps that may occurduring the transition from live mode to playback mode. Once the startposition is determined, the A-scan by A-scan search is limited to asmall region given that the time and possible movement between A-scansis small relative to the frame to frame motion. For example, for thefirst frame the search region may be set to −50 to +50 pixels from thelast location, once the maximum correlation is found, the search regionis limited to −1 to +1 pixels for each A-scan. Alternatively, the searchregion may be set to at least about −500 to +500 pixels, alternativelybetween at least about −400 to +400, alternatively between about −300 to+300, and the like. The search region may be limited to between about−10 to +10, alternatively, between about −5 to +5, alternatively betweenabout −0.1 and +0.1. Once the first frame has been fully traced, asshown in FIG. 25A, the algorithm moves on to the next frame beginningwith the first A-scan and limited the search region based on theposition of the reflection in the last A-scan. FIG. 25B shows that thereflection position is stored for later alignment and display throughstoring the template match position for alignment prior to the displayof the image on a screen of a video monitor or other display device.This is repeated for each A-scan in all frames.

The detailed flow chart of the playback mode calibration process 800 isprovided in FIG. 26. The playback mode calibration initializes bysearching all A-scans within an image to identify the peak correlation.From the peak, the correlation tracker tracks forwards and backwards toidentify the reflection position for each A-scan in the first frame.This search is applied to the first frame to guarantee a strong initiallock. Each of the following frames after the first frame is trackedA-scan by A-scan with limited search regions. The manual mode 840 istransitioned when the lock lost counter threshold has been exceeded andthe user selects manual mode. Alternatively, the manual mode 840 may beselected if the pull or push data has been recorded 842. If manual modehas been selected, then no playback mode autocalibration will be appliedin step 844. If manual mode has not been selected, then step 850identifies the allowable shifts for the first frame based on the push orpull of the catheter. Then step 852 computes the full template for allallowable shift positions. Then step 854 computes the correlation forall A-scans and template positions. Then step 856 finds the maximumcorrelation for each A-scan. Then step 858 finds the maximum correlationand corresponding A-scan. Then step 860 applies the correlation trackingalgorithm 810 to each A-scan in the image.

The correlation tracking algorithm 810 starts with step 812 of computingthe correlation for allowable template shifts in the current A-scan.Then step 814 finds the maximum correlation for that A-scan. Then step816 computes the correlation confidence threshold of the runningaverage. Then decision 820 determines if the correlation is above aparticular confidence threshold. If the correlation is above aparticular confidence threshold, then step 822 resets the lock lostcounter to 0. If the correlation is not above a particular confidencethreshold, then step 824 proceeds to increment the lock lost counter.After step 824, decision 830 determines if the lock lost counterthreshold has been exceeded. If the lock lost counter threshold has notbeen exceeded, the step 832 uses the track position of the previousA-scan. If the lock lost counter threshold has been exceeded, then step834 it warns the user and transitions to manual mode. Both step 822 and832 proceed to step 836 to update the track position and steps to thenext A-scan. After step 836, step 812 computes the correlation forallowable shifts in the current A-scan.

After step 864 of applying the correlation tracking algorithm to eachA-scan in the image, decision 870 determines if it is the last frame. Ifit is the last frame, then step 872 stores the calibration positions forthe display. If there are more frames, then decision 880 determines ifthe transition to manual mode is required or commanded. If thetransition to manual mode has been selected, then step 862 increments tothe next frame. If the transition to manual mode has not been selected,then step 882 warns the use and transitions to manual mode. After step872, step 874 determines that the playback mode calibration has beencompleted. Various inputs 890 may be coupled with the playback modeprocess, such as the B-scan, current Z-offset, and the pull or pushindicator for the catheter.

Generally, in one embodiment for the auto-calibration 900 is shown inFIG. 27. Any of the previously discussed calibration methods may be usedto continuously update and maintain the calibration on a frame-by-framebasis after the initial calibration. Step 902 performs the initialautomatic calibration or manual calibration as previously discussed.Step 904 monitors at least one parameter indicative of the calibrationposition. Decision 906 determines if the calibration needs to be updatedon the existing frame or subsequent frame. If the calibration does notneed to be updated for the frame, then the automatic calibrationcontinues to monitor the parameter indicative of the calibrationposition in step 904. If the calibration does need to be updated for theframe, the step 908 automatically updates the calibration (such as todigitally shift the image, apply the z-offset shift, or any of themethods previously discussed. The frame may be an A-scan, or set offrames.

It will be understood that each block of the flowchart illustrations,and combinations of blocks in the flowchart illustrations, as well anyportion of the module, systems and methods disclosed herein, can beimplemented by computer program instructions. These program instructionsmay be provided to a processor to produce a machine, such that theinstructions, which execute on the processor, create means forimplementing the actions specified in the flowchart block or blocks ordescribed for the tissue classifier, imager, control module, systems andmethods disclosed herein. The computer program instructions may beexecuted by a processor to cause a series of operational steps to beperformed by the processor to produce a computer implemented process.The computer program instructions may also cause at least some of theoperational steps to be performed in parallel. Moreover, some of thesteps may also be performed across more than one processor, such asmight arise in a multi-processor computer system. In addition, one ormore processes may also be performed concurrently with other processesor even in a different sequence than illustrated without departing fromthe scope or spirit of the invention.

The computer program instructions can be, stored on any suitablecomputer-readable medium including, but not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by a computing device.

It will be understood that the catheter pullback may be performed bypulling the catheter from a proximal end to a distal end of the regionbeing imaged. It also will be understood that the intravascular imagingtechniques described above can also be used with other types of imagingtechniques that use a catheter insertable into patient vasculature. Forexample, the intravascular imaging techniques can be used with anyimaging techniques configured and arranged to assess one or moremeasurable characteristics of patient tissue (e.g., intravascularmagnetic resonance imaging, spectroscopy, temperature mapping, or thelike).

The systems and methods described herein may be embodied in manydifferent forms and should not be construed as limited to theembodiments set forth herein. Accordingly, the disclosed systems andmethods may take the form of an entirely hardware embodiment, anentirely software embodiment, or an embodiment combining software andhardware aspects. The systems and methods of use described herein can beperformed using any type of computing device, such as a computer thatincludes a processor or any combination of computing devices where eachdevice performs at least part of the process or method.

Suitable computing devices typically include mass memory and typicallyinclude communication between devices. The mass memory illustrates atype of computer-readable media, namely computer storage media. Computerstorage media may include volatile, nonvolatile, removable, andnon-removable media implemented in any method or technology for storageof information, such as computer readable instructions, data structures,program modules, or other data. Examples of computer storage mediainclude RAM, ROM, EEPROM, flash memory, or other memory technology,CD-ROM, digital versatile disks (DVD) or other optical storage, magneticcassettes, magnetic tape, magnetic disk storage or other magneticstorage devices, Radiofrequency Identification tags or chips, or anyother medium which can be used to store the desired information andwhich can be accessed by a computing device. Communication betweendevices or components of a system can include both wired and wireless(e.g., RF, optical, or infrared) communications.

While the invention has been described in connection with variousembodiments, it will be understood that the invention is capable offurther modifications. This application is intended to cover anyvariations, uses, or adaptations of the invention following, in general,the principles of the invention and including such departures from thepresent disclosure as are within the known and customary practice withinthe art to which the invention pertains.

1. A method of calibrating a catheter, comprising: obtaining an image ina catheter; and utilizing a template to identify the position ofcatheter reflection lines.
 2. The method of claim 1, wherein thetemplate is stored or operably accessible with the specific catheter. 3.The method of claim 1, wherein the template is derived directly from theimage of the catheter.
 4. The method of claim 1, further comprisingmatching the template with a version of the image and identifying apeak.
 5. The method of claim 4, wherein the version of the image isbinary.
 6. The method of claim 4, further comprising selecting the peakthat corresponds to a strongest template match.
 7. The method of claim6, wherein the peak is above a certain value.
 8. The method of claim 1,further comprising adjusting the Z-offset position if no template matchis identified and taking a second image of the catheter at the newposition to be evaluated with the template matching step.
 9. The methodof claim 4, further comprising identifying the position of the catheterreflection lines and shifting the catheter reflection lines by adjustingthe Z-offset if a template match is identified.
 10. The method of claim6, where the adjusting Z-Offset step comprises the mechanical shiftingof the Variable Delay Line.